<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script type="text/javascript" src="<?=JS_PATH?>jquery.min.js"></script>
    <script src="<?=ASSETS?>time/js/foundation-datepicker.js" type="text/javascript"></script>
    <script src="<?=ASSETS?>time/js/foundation-datepicker.zh-CN.js" type="text/javascript"></script>
    <script type="text/javascript" src="<?=ASSETS?>layer/layer.js"></script>
    <link href="<?=ASSETS?>time/css/foundation-datepicker.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="<?=ASSETS?>bootstrap/bootstrap.min.css" />
    <title>文章列表</title>
</head>
<script>

    $(function(){

        var ue = UE.getEditor('container',{
            autoHeight:false
        });

        ue.ready(function(){

            ue.setContent('<?=$about?>');
        });


        $("#publish").click(function(){

           var content = ue.getContent();


           var url = "<?=web_url('myself/about',true)?>";
            $.post(url,{about:content},function(data,status){

                ue.ready(function(){

                    ue.setContent(data);
                });

                layer.msg("保存成功");
            })
        });

    });

</script>
<body>
<div class="container" style="margin-top: 3%">

    <div class="row col-lg-10 col-lg-offset-1">

        <label>关于</label>
        <hr style="margin: 0px 0px 10px 0px;"/>
        <!-- 加载编辑器的容器 -->
        <script id="container" style="width:100%;height:280px;" name="content" type="text/plain"></script>
        <!-- 配置文件 -->
        <script type="text/javascript" src="<?=ASSETS?>uedit/ueditor.config.js"></script>
        <!-- 编辑器源码文件 -->
        <script type="text/javascript" src="<?=ASSETS?>uedit/ueditor.all.js"></script>
        <label style="margin-top: 5px;">操作</label>
        <hr style="margin: 5px 0px 10px 0px;"/>
        <button id="publish" class="btn btn-primary col-lg-offset-5 btn-sm">立即保存</button>

    </div>

</div>


</body>
</html>
